package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.entity.Message;
import com.jeff.tianti.cms.dao.MessageDao;
import com.jeff.tianti.cms.dto.MessageQueryDTO;
import com.jeff.tianti.common.service.CommonService;
import com.jeff.tianti.common.entity.PageModel;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * @author liuyi
 * @desc MessageService类 
 * @date 2019-06-21
 */
@Service
public class MessageService extends CommonService< Message,String >  {

    @Autowired
    private MessageDao messageDao;

    @Autowired
    public void setMessageDao(MessageDao messageDao){
      super.setCommonDao(messageDao);
    }

    public PageModel<Message> queryMessagePage(MessageQueryDTO messageQueryDTO){
           return this.messageDao.queryMessagePage(messageQueryDTO);
    }

    public List<Message> queryMessageList(MessageQueryDTO messageQueryDTO){
           return this.messageDao.queryMessageList(messageQueryDTO);
    }

    /**
     * 保存Entity
     *
     * @param entity
     * @return
     */

    public Message save(Message message) {
        return super.save(message);
    }

}